<#assign pageTitle = "我的会员" />
<#assign pageHeader>
	<script type="text/javascript" src="/static/js/order.js"></script>
	<script type="text/javascript">
		/*到提交订单并支付*/

	</script>
</#assign>
<#assign pageContent>
	<article class="w80 fl">
		<div class="u-r-cont">
			<section class="u-r-tit-all">
				<h2 class="unFw">
							<span class="current">
								我的会员
							</span>
				</h2>
			</section>
			<div class="u-r-all-box" id="p_tCont">
				<section class="member-all-box">
					<div class="member-zt">
						<article class="mem-zt-box">
							<ul class="clearfix">
								<#list memberTypeList as memberType>

									<li>
										<div class="u-m-card
													<#if memberType.endDate??> u-m-card-yes<#else>u-m-card-no</#if>">
											<section class="ml10 mr10">
												<p class="f-fM u-m-c-txt hLh30 tac mt10">
													<em class="icon30 vip-ico">&nbsp;</em>
													<tt class="vam f-fM c-999 fsize16">${memberType.title}</tt>
												</p>
												<p class="hLh20 of mt15">
													<!--开通了该类会员-->
													<tt class="fsize12 c-999 vam f-fM">状&nbsp;&nbsp;&nbsp;态：</tt>
													<#if memberType.endDate??>
														<#if (memberType.endDate?long gt (.now?long+604800000))>
															<tt class="fsize12 c-green vam f-fM">已开通</tt>
														<#elseif (memberType.endDate?long lt .now?long)>
															<tt class="fsize12 c-master vam f-fM">已过期</tt>
														<#else>
															<tt class="fsize12 c-master vam f-fM">即将到期</tt>
														</#if>
													<#else>
														<tt class="fsize12 c-999 vam f-fM">未开通</tt>
													</#if>
												</p>
												<p class="vip-tq-txt of hLh20 mt5 vip-tq-txt-mo txtOf">
													<#if memberType.endDate??>
														<tt class="fsize12 c-999 vam f-fM">有效期：</tt>
														<tt class="fsize12 c-999 vam f-fM">
															${memberType.endDate?string("yyyy-MM-dd")}
														</tt>
													<#else>
														<tt class="fsize12 c-999 vam f-fM">权限：</tt>
														<tt class="fsize12 c-999 vam f-fM">网站内所属该会员权限课程都可免费观看</tt>
													</#if>
												</p>
												<div class="tac u-m-c-b-warp">
													<#if memberType.status==0>
														<a href="javascript:void (0)" onclick="buyMember(${memberType.id})" title="开通会员" class="u-m-c-btn f-fM tac">
															<#if memberType.endDate??>
																我要续费
															<#else>
																马上开通
															</#if>
														</a>
													</#if>
													<#if memberType.status==1>
														<a href="javascript:void (0)" title="开通会员" class="u-m-c-btn f-fM tac">
															该类会员已停用
														</a>
													</#if>
												</div>
											</section>
										</div>
									</li>
								</#list>
							</ul>
						</article>
					</div>
					<div class="member-jl mt50">
						<div class="m-acc-title">
									<span class="f-fM">
										开通记录
									</span>
						</div>
						<div class="mem-body">
							<table class="member-jl-tab" width="100%" cellspacing="0" cellpadding="0" border="0">
								<thead>
								<tr>
									<th align="center">标题</th>
									<th align="center">开通日期</th>
									<th align="center">结束日期</th>
									<th align="center" class="mobile-none">状态</th>
									<th align="center">价格</th>
								</tr>
								</thead>
								<tbody>
								<#if memberDetails?? && memberDetails?size gt 0>
									<#list memberDetails as memberDetail>
										<tr>
											<td align="center">${memberDetail.description}</td>
											<td align="center">
												${memberDetail.beginDate?string("yyyy-MM-dd")}
											</td>
											<td align="center">
												${memberDetail.endDate?string("yyyy-MM-dd")}
											</td>
											<td align="center" class="mobile-none">
												<#if memberDetail.status==0>
													<#if (memberDetail.endDate?long lt .now?long)>
														<tt class="c-master f-fM">已过期</tt>
													<#else>
														<tt class="u-ass-zc f-fM">正常</tt>
													</#if>
												<#else>
													<tt class="u-ass-gq f-fM">关闭</tt>
												</#if>
											</td>
											<td align="center">${(memberDetail.price/100)}元</td>
										</tr>
									</#list>
								</#if>
								</tbody>
							</table>
							<!-- 公共分页 开始 -->
							<div class="paging" id="showPages"></div>
							<!-- 公共分页 结束 -->
						</div>
					</div>
				</section>
			</div>
		</div>
	</article>
</#assign>
<#assign pageFooter>
	<script type="text/javascript" src="/static/js/page.js"></script>
	<script type="text/javascript">
		var options = {
			currentPage : ${page.currentPage}
			,totalPage : ${totalPages}
		};
		$(function () {
			showPages(options);
		});
	</script>
</#assign>
<#include "../layouts/layout_uc.ftl">